package com.igeek.compus.study.menu.service.impl;

import com.igeek.compus.study.menu.dao.MenuDao;
import com.igeek.compus.study.menu.entity.Menu;
import com.igeek.compus.study.menu.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuDao menuDao;

    @Override
    public List<Menu> getMenuListByPage(Menu menu) {
        return menuDao.getMenuListByPage(menu);
    }

    @Override
    public int getMenuListCount(Menu menu) {
        return menuDao.getMenuListCount(menu);
    }

    @Override
    public Menu getMenuInfoById(Integer id) {
        return menuDao.getMenuInfoById(id);
    }

    @Override
    public int deleteMenuById(Menu menu) {
        return menuDao.deleteMenuById(menu);
    }

    @Override
    public int deleteMenuList(List<String> menuIdList) {
        return menuDao.deleteMenuList(menuIdList);
    }

    @Override
    public int addMenu(Menu menu) {
        return menuDao.addMenu(menu);
    }

    @Override
    public int updateMenuById(Menu menu) {
         return menuDao.updateMenuById(menu);
    }




}
